package util;

import java.awt.image.BufferedImage;

public class Functions {
	//旋转图片方法
	public static BufferedImage rotateClockwise90(BufferedImage bi) {
		int width = bi.getWidth();
		int height = bi.getHeight();
		BufferedImage bufferedImage = new BufferedImage(height, width, bi.getType());
		for (int i = 0; i < width; i++)
			for (int j = 0; j < height; j++)
				bufferedImage.setRGB(height - 1 -j ,i, bi.getRGB(i, j));
		return bufferedImage;
	}
}
